From 1ec34ae0854c5f7cf6eac5ed18115d64b5b52e72 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 28 Dec 2015 13:59:10 -0500 Subject: [PATCH] Add a css style test for :first/last/only-child --- testsuite/css/style/Makefile.am | 1 + testsuite/css/style/nth-child.css | 14 +++++++++ testsuite/css/style/nth-child.nodes | 13 ++++++++ testsuite/css/style/nth-child.ui | 48 +++++++++++++++++++++++++++++ 4 files changed, 76 insertions(+) create mode 100644 testsuite/css/style/nth-child.css create mode 100644 testsuite/css/style/nth-child.nodes create mode 100644 testsuite/css/style/nth-child.ui diff --git a/testsuite/css/style/Makefile.am b/testsuite/css/style/Makefile.am index db48f79358..a7d1e99e1b 100644 --- a/testsuite/css/style/Makefile.am +++ b/testsuite/css/style/Makefile.am @@ -26,6 +26,7 @@ test_css_style_SOURCES = \ test_data = \ label.ui label.css label.nodes \ + nth-child.ui nth-child.css nth-child.nodes \ $(NULL) EXTRA_DIST += $(test_in_files) $(test_data) diff --git a/testsuite/css/style/nth-child.css b/testsuite/css/style/nth-child.css new file mode 100644 index 0000000000..96265b2acc --- /dev/null +++ b/testsuite/css/style/nth-child.css @@ -0,0 +1,14 @@ +@import "reset-to-defaults.css"; + +label:first-child { + font-size: 20px; +} +label { + font-size: 30px; +} +label:last-child { + font-size: 40px; +} +label:only-child { + font-size: 50px; +} diff --git a/testsuite/css/style/nth-child.nodes b/testsuite/css/style/nth-child.nodes new file mode 100644 index 0000000000..55c70d8442 --- /dev/null +++ b/testsuite/css/style/nth-child.nodes @@ -0,0 +1,13 @@ +window visible=0 state=dir-ltr classes=background + decoration visible=1 state=dir-ltr + box visible=1 state=dir-ltr classes=horizontal + box visible=1 state=dir-ltr classes=horizontal + label visible=1 state=dir-ltr + font-size: 20px (nth-child.css:4:17) + label visible=1 state=dir-ltr + font-size: 30px (nth-child.css:7:17) + label visible=1 state=dir-ltr + font-size: 40px (nth-child.css:10:17) + box visible=1 state=dir-ltr classes=horizontal + label visible=1 state=dir-ltr + font-size: 50px (nth-child.css:13:17) diff --git a/testsuite/css/style/nth-child.ui b/testsuite/css/style/nth-child.ui new file mode 100644 index 0000000000..b0b6765860 --- /dev/null +++ b/testsuite/css/style/nth-child.ui @@ -0,0 +1,48 @@ + + + + + + False + popup + + + True + + + True + + + True + Hello World! + + + + + True + Hello World! + + + + + True + Hello World! + + + + + + + True + + + True + Hello World! + + + + + + + + -- 2.30.2